/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  							 script_numeric_literal.cpp

	$Header: /heroes4/script_numeric_literal.cpp $

	$NoKeywords: $

 ************************************************************************/

#include "precompiled.h"
#include "script_numeric_literal.h"

#include "sized_int_types.h"
#include "streambuf_operators.h"

// --------------------------------------------------------------------------
// t_script_numeric_literal members
// --------------------------------------------------------------------------

// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
bool t_script_numeric_literal::read_from_map(
	std::streambuf &	stream,
	int					format_version )
{
	m_value = get< t_int32 >( stream );
	return true;
}

// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
bool t_script_numeric_literal::read( std::streambuf& stream, int version )
{
	m_value = get< t_int32 >( stream );
	return true;
}

// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
bool t_script_numeric_literal::write( std::streambuf& stream ) const
{
	if (t_abstract_script_numeric_expression::write( stream ) == false) 
		return false;
	
	put< t_int32 >( stream, m_value );
	return true;
}
